<?php
/**
 * NOTICE OF LICENSE
 *
 * This source file is subject to the  Academic Free License (AFL 3.0)
 * that is available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to support@zprofess.com so we can send you a copy immediately.
 *
 * @category   	Prestashop module
 * @package		Review Rating Synthesis
 * @version 	1.0
 * @author 		Nguyen Dinh Nhat <nguyendnhat@gmail.com>
 * @copyright   Copyright (c) 2012 ZPROFESS. (http://zprofess.com)
 * @license    	http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
include_once(dirname(__FILE__)."/classes/ZluckyMember.php");
/**
 * Once field in tab ZadminEmailEvent
 * @author Nguyen Dinh Nhat <nguyendnhat@gmail.com>
 *
 */
class ZadminMemberLucky extends ZadminTab {
	public function __construct()
	{
		global $cookie;
		$this->table = 'zgallery_lucky_member';
	 	$this->className = 'ZluckyMember';
	 	$this->delete = true;
		$this->fieldsDisplay = array(
			'id_customer' => array('title' => $this->l('id_customer'), 'align' => 'center', 'width' => 53),
			'id_photo' => array('title' => $this->l('id_photo'), 'align' => 'center', 'width' => 53),
			'name' => array('title' => $this->l('Name Customer'), 'align' => 'center', 'width' => 250),
			'namePhoto' => array('title' => $this->l('Name Photo'), 'align' => 'center', 'width' => 250),
			'date_add' => array('title' => $this->l('Create Date'), 'type'=>'datetime' ,'align' => 'right', 'width' => 100) 
		);
		$this->_join = '
			LEFT JOIN '._DB_PREFIX_.'customer c ON (a.id_customer=c.id_customer)
			LEFT JOIN '._DB_PREFIX_.'zgallery_photo_lang pl ON (a.id_photo = pl.id_zgallery_photo AND pl.id_lang='.$cookie->id_lang.') 
		';
		$this->_select = 'c.username as name, pl.name as namePhoto';
		parent::__construct();
	}
/**
	 * Xử lý thông tin dc up lên
	 * @param unknown_type $token
	 */
	public function postProcess($token = NULL)
	{
		global $currentIndex,$cookie;
		
		parent::postProcess ();
	}
}